import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;
import com.jfinal.server.undertow.UndertowServer;
import com.jfinal.template.Engine;
import httpclient.jfinal.aop.ProxyHandler;
import httpclient.sdk.PoolingHttpClientConfig;


public class MainConfig extends JFinalConfig {
    public static void main(String[] args) {
        UndertowServer.create(MainConfig.class).start();
    }

    /**
     * 配置全局处理器
     */
    @Override
    public void configHandler(Handlers me) {
        me.add(new ProxyHandler());
    }

    /**
     * 项目启动后调用
     */
    @Override
    public void onStart() {
        PoolingHttpClientConfig.init();
    }

    @Override
    public void configEngine(Engine me) {

    }

    @Override
    public void configPlugin(Plugins me) {

    }

    @Override
    public void configConstant(Constants me) {

    }

    @Override
    public void configRoute(Routes me) {

    }

    @Override
    public void configInterceptor(Interceptors me) {

    }
}
